package com.ipartek.desarrollo.beanHibernate;

// Generated 26-feb-2014 21:38:33 by Hibernate Tools 3.4.0.CR1

import static javax.persistence.GenerationType.IDENTITY;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Parametros generated by hbm2java
 */
@Entity
@Table(name = "parametros")
public class Parametros implements java.io.Serializable {

	private Integer paramId;
	private String paramNom;
	private Set<IoParametros> ioParametroses = new HashSet<IoParametros>(0);
	private Set<Diccionariocampos> diccionariocamposes = new HashSet<Diccionariocampos>(
			0);
	private Set<Tipform> tipforms = new HashSet<Tipform>(0);

	public Parametros() {
	}

	public Parametros(String paramNom, Set<IoParametros> ioParametroses,
			Set<Diccionariocampos> diccionariocamposes, Set<Tipform> tipforms) {
		this.paramNom = paramNom;
		this.ioParametroses = ioParametroses;
		this.diccionariocamposes = diccionariocamposes;
		this.tipforms = tipforms;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ParamId", unique = true, nullable = false)
	public Integer getParamId() {
		return this.paramId;
	}

	public void setParamId(Integer paramId) {
		this.paramId = paramId;
	}

	@Column(name = "ParamNom", length = 80)
	public String getParamNom() {
		return this.paramNom;
	}

	public void setParamNom(String paramNom) {
		this.paramNom = paramNom;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "parametros")
	public Set<IoParametros> getIoParametroses() {
		return this.ioParametroses;
	}

	public void setIoParametroses(Set<IoParametros> ioParametroses) {
		this.ioParametroses = ioParametroses;
	}

	@ManyToMany(fetch = FetchType.LAZY)
	@JoinTable(name = "parametros_campos", joinColumns = { @JoinColumn(name = "ParamId", nullable = false, updatable = false) }, inverseJoinColumns = { @JoinColumn(name = "CampId", nullable = false, updatable = false) })
	public Set<Diccionariocampos> getDiccionariocamposes() {
		return this.diccionariocamposes;
	}

	public void setDiccionariocamposes(
			Set<Diccionariocampos> diccionariocamposes) {
		this.diccionariocamposes = diccionariocamposes;
	}

	@ManyToMany(fetch = FetchType.LAZY, mappedBy = "parametroses")
	public Set<Tipform> getTipforms() {
		return this.tipforms;
	}

	public void setTipforms(Set<Tipform> tipforms) {
		this.tipforms = tipforms;
	}

}
